package cn.congzhou.crm.mapper;

import cn.congzhou.crm.domain.Employee;
import cn.congzhou.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> selectByPage(QueryObject qo);

    void deleteRelation(Long empId);

    void insetRelation(@Param("empId") Long empId, @Param("roleId") Long roleId);

    //查询员工信息用于登录
    Employee selectLogin(@Param("name") String name, @Param("password") String password);

    List<String> selectExpressionById(Long empId);

    void batchDelete(Long[] ids);

//  通过用户名查询用户信息，用于验证登录
    Employee selectEmployeeByUsername(String username);

    List<Employee> queryNewSeller(String[] roles);

    Employee selectByName(String name);

    int checkEmpCountByDeptIds(Long[] ids);

}